package com.wjy.rbac.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.wjy.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author ybxxszl
 * @since 2019-04-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bd_power")
@ApiModel(value = "Power对象", description = "")
public class Power extends BaseEntity {

    @ApiModelProperty(value = "权限ID")
    @TableId(value = "power_id", type = IdType.UUID)
    private String powerId;

    @ApiModelProperty(value = "权限名称")
    @TableField("power_name")
    private String powerName;

    @ApiModelProperty(value = "状态 0不可用 1可用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "logic_delete", fill = FieldFill.INSERT)
    @TableLogic
    private Integer logicDelete;

    @ApiModelProperty(value = "乐观锁")
    @TableField(value = "version", fill = FieldFill.INSERT)
    @Version
    private Integer version;

    @ApiModelProperty(value = "添加人ID")
    @TableField(value = "insert_id", fill = FieldFill.INSERT)
    private String insertId;

    @ApiModelProperty(value = "添加时间")
    @TableField(value = "insert_time", fill = FieldFill.INSERT)
    private Date insertTime;

    @ApiModelProperty(value = "更新人ID")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private String updateId;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    public static final String POWER_ID = "power_id";

    public static final String POWER_NAME = "power_name";

    public static final String STATUS = "status";

    public static final String LOGIC_DELETE = "logic_delete";

    public static final String VERSION = "version";

    public static final String INSERT_ID = "insert_id";

    public static final String INSERT_TIME = "insert_time";

    public static final String UPDATE_ID = "update_id";

    public static final String UPDATE_TIME = "update_time";

}
